package com.wyz.socket.core.base.packet.stream;

import com.wyz.socket.core.base.packet.AbstractSendPacket;


import java.io.InputStream;

public class StreamDirectSendPacket extends AbstractSendPacket<InputStream> {

    private InputStream stream ;

    public StreamDirectSendPacket(InputStream stream) {
        this.stream = stream;
        this.length = MAX_PACKET_SiZE ;
    }

    @Override
    public byte type() {
        return TYPE_STREAM_DIRECT;
    }

    @Override
    protected InputStream createStream() {
        return stream;
    }
}
